package com.klun.hdfs.hd.patitioner;

import com.klun.hdfs.hd.pojo.TableBean;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Partitioner;

public class BrandPartitioner extends Partitioner<Text, TableBean> {

    @Override
    public int getPartition(Text key, TableBean value, int nulP) {
        Integer integer = Integer.valueOf(value.getP_id());
        return integer%nulP;
    }
}
